#ifndef TCPCLIENTSOCKET_H
#define TCPCLIENTSOCKET_H

#include <QObject>
#include<QTcpSocket>

class TcpClientSocket : public QTcpSocket
{
    Q_OBJECT
public:
    explicit TcpClientSocket(QObject *parent = nullptr);

signals:
    //通知服务器或客户端收到了消息
    void sigUpdateSever(QString);
    //通知服务器或客户端掉线
    void sigClientDisconnect(qintptr);
public slots:
    //处理readyRead信号读取数据
    void slotReceiveDate();
    //处理客户端断开连接触发的disconnect信号
    void slotClientDisconnected();
};

#endif // TCPCLIENTSOCKET_H
